
#define LINELEN 1024
#define SG101 "hello helen"
void MSG(char *fmt,...)
{
va_list ap;
char errmsg[LINELEN];
va_start(ap,fmt);
vsnprintf(errmsg,LINELEN-1,fmt,ap);
va_end(ap);
fprintf(stderr,"%s\n",errmsg);
}
MSG("read-only file '%s' prent ip %s",file,ip);
MSG(SG101);
MSG("helen is helen");